﻿using Autofac;
using SXICE.Core.Helpers;
using SXICE.Core.Infrastructure;
using SXICE.Core.Models;
using SXICE.IRepository;
using SXICE.IService;
using SXICE.Service.Utilities;
using System;
using System.Linq;
using System.Reflection;

namespace SXICE.Service
{
    /// <summary>
    /// 模块注册器
    /// </summary>
    public class ModuleRegister : IModule
    {
        public ModuleInfo GetModuleInfo()
        {
            return new ModuleInfo
            {
                Author = "ts",
                Version = "1.0",
                Description = "默认服务"
            };
        }

        public void Init()
        {
        }

        public void Register(ContainerBuilder container)
        {
            container.RegisterType<DoctorService>().As<IDoctorService>().InstancePerLifetimeScope();
            container.RegisterType<RightsService>().As<IRightsService>().InstancePerLifetimeScope();
            container.RegisterType<MenuService>().As<IMenuService>().InstancePerLifetimeScope();
        }

        public void Start()
        {
            //TJHelper.HandleFailedInfo();
        }

        public void Stop()
        {
        }
    }
}